<?php
namespace App\Hospital\Models;

use App\Models\Hospital;
use App\Models\HospitalAppoint;
use Dcat\Admin\Admin;
use Illuminate\Database\Eloquent\Builder;

class HospitalModel extends Hospital{


    protected static function boot()
    {
        parent::boot();

        static::addGlobalScope('id', function (Builder $builder) {
            $builder->where('id', Admin::user()->hospital_id);
        });
    }
}